const Router = require('koa-router')
const router = new Router()
const WsjAuth = require('../core/wsjAuth.js')

const LoginController = require('../controllers/login')

const InsertStkNotesController = require('../controllersFe/insertStkNotes')
const PublicSquareListController = require('../controllersFe/publicSquareList')


router.prefix('/api/fe')

router.post('/insertStkNotes', new WsjAuth(111).w, InsertStkNotesController.insert)

router.get('/publicSquareList',PublicSquareListController.getPublicSquareList,(ctx,next)=>{
  console.log('======末尾了');
})


//登录
router.post('/login', async (ctx, next) => {
  // console.log('第2路啦啦啦');
  // throw new global.errs.NotFound('没有找到相关文章');
  await next();
}, LoginController.login);

module.exports = router